Imports System.ComponentModel
Imports Aricie.DNN.UI.Attributes
Imports Aricie.DNN.Caching
Imports Aricie.ComponentModel
Imports DotNetNuke.UI.WebControls
Imports System.Xml.Serialization

Namespace Aricie.DNN.Caching
    <Serializable()> _
    Public Class LoggingSettings

        Private _EnableDebugLogging As Boolean = True
        Private _EnableStatsCollector As Boolean = False

        Private _LogEarlyGets As Boolean
        'Private _LogAlreadyIndividualStrategies As Boolean = False
        Private _MaxNbEventsPerCollector As Integer = 100


        <ExtendedCategory("AdvancedDebugSettings")> _
            <MainCategory()> _
        Public Property EnableDebugLogging() As Boolean
            Get
                Return Me._EnableDebugLogging
            End Get
            Set(ByVal value As Boolean)
                Me._EnableDebugLogging = value
            End Set
        End Property


        <ExtendedCategory("AdvancedCollectorSettings")> _
        Public Property EnableStatsCollector() As Boolean
            Get
                Return _EnableStatsCollector
            End Get
            Set(ByVal value As Boolean)
                _EnableStatsCollector = value
            End Set
        End Property


        <ExtendedCategory("AdvancedDebugSettings")> _
        Public Property LogEarlyGets() As Boolean
            Get
                Return _LogEarlyGets
            End Get
            Set(ByVal value As Boolean)
                _LogEarlyGets = _EnableDebugLogging AndAlso value
            End Set
        End Property


        '<Category("AdvancedCollectorSettings")> _
        'Public Property LogAlreadyIndividualStrategies() As Boolean
        '    Get
        '        Return _LogAlreadyIndividualStrategies
        '    End Get
        '    Set(ByVal value As Boolean)
        '        _LogAlreadyIndividualStrategies = value
        '    End Set
        'End Property


        <ExtendedCategory("AdvancedCollectorSettings")> _
            <Required(True)> _
        Public Property MaxNbEventsPerCollector() As Integer
            Get
                Return _MaxNbEventsPerCollector
            End Get
            Set(ByVal value As Integer)
                _MaxNbEventsPerCollector = value
            End Set
        End Property


    End Class
End Namespace